#ifndef USERMANAGE_H
#define USERMANAGE_H

#include "User.h"
#include <list>

class UserManage {
 public:
  static UserManage *getInstance(void);
  ~UserManage();
  void initUsersList(std::list<User> users); //new
  std::list<User> acquireUsersList(void); //new
  User* findUserByName(std::string userName);
  bool createUser(std::string userName, std::string userPassword, std::string userEmail,
                  std::string userPhone);
  bool deleteUser(User user);
  bool updateUserPassword(User user, std::string newPassword);
  bool updateUserEmail(User user, std::string newEmail);
  bool updateUserPhone(User user, std::string newPhone);
  std::list<User> listAllUsers(void);

 private:
  UserManage();
  static bool instanceFlag_;
  static UserManage *instance_;
  std::list<User> users_;
};

#endif
